<template>
  <div class="app-main-container">
    <div class="app-main-title">
      {{ translate("chakanRask") }}
      <div class="goback" @click="goBack">
        <i class="el-icon-refresh-left" /> {{ translate("backPage") }}
      </div>
    </div>

    <el-form class="doumee-form" label-width="auto" label-suffix="：">
      <div class="property-title">{{ translate("taskInfo") }}</div>
      <el-form-item :label="translate('taskName')">
        <span>{{ info.name }}</span>
      </el-form-item>
      <el-form-item :label="translate('taskDesc')">
        <span>{{ info.taskInfo }}</span>
      </el-form-item>
      <el-form-item :label="translate('roleConsumType')">
        <span>{{ info.typeInfo }}</span>
      </el-form-item>
      <el-form-item :label="translate('yjblUnit')">
        <span>{{ info.ratio }}</span>
      </el-form-item>
      <el-form-item :label="translate('dbqdje')">
        <span>{{ info.beginMoney }}</span>
      </el-form-item>
      <el-form-item :label="translate('fybs')">
        <span>{{ info.orderNum }}</span>
      </el-form-item>
      <el-form-item :label="translate('taskIndate')">
        <span>{{ info.beginTime || "" }}</span>
        <span v-if="info.beginTime && info.endTime">~</span>
        <span v-else>{{ translate("buxian") }}</span>
        <span>{{ info.endTime || "" }}</span>
      </el-form-item>
      <el-form-item :label="translate('createTime')">
        <span>{{ info.createTime }}</span>
      </el-form-item>
      <div class="property-title">{{ translate("fxhb") }}</div>

      <!-- <el-form-item label="分享封面">
        <el-image
          style="width: 200px"
          :preview-src-list="[info.shareFmPath]"
          :src="info.shareFmPath"
        />
      </el-form-item> -->
      <el-form-item :label="translate('hbfxfm')">
        <el-image
          style="width: 200px"
          :preview-src-list="[info.sharePicPath]"
          :src="info.sharePicPath"
        />
      </el-form-item>
      <el-form-item :label="translate('qrcodeAddr')">
        <span v-if="info.postion === '0'">{{ translate("center") }}</span>
        <span v-if="info.postion === '1'">{{ translate("lowLeft") }}</span>
        <span v-if="info.postion === '2'">{{ translate("lowRight") }}</span>
      </el-form-item>
      <el-form-item :label="translate('ewmtz')">
        <span>{{ info.shareUrlTitle }}</span>
      </el-form-item>
      <el-form-item :label="translate('hbfxbt')">
        <span>{{ info.shareTitle }}</span>
      </el-form-item>
      <!-- <el-form-item label="分享/海报描述">
        <span>{{ info.shareInfo }}</span>
      </el-form-item> -->
    </el-form>
  </div>
</template>

<script>
import { ShareDetail } from '@/api'
export default {
  data() {
    return {
      id: '',
      info: {}
    }
  },
  created() {
    this.id = this.$route.query.id
    this.getInfo()
  },
  methods: {
    getInfo() {
      ShareDetail({ param: { shareId: this.id }}).then(res => {
        this.info = res.record
      })
    },
    goBack() {
      this.$router.replace('/application/shareModule?activeTab=1')
    }
  }
}
</script>

<style>
</style>
